<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'MyJsp.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<jsp:include page="/scripts/jquery/index.html"></jsp:include>
</head>
<script type="text/javascript">
	function doLogin() {
		$.ajax({
				type : 'POST' ,
				url : 'page/system/manage/doLogin' ,
				data : $('#MyForm').serialize() ,
				dataType : "json" ,
				async : true ,
				cache : false ,
				jsonpCallback : "null" ,
				//beforeSend : function(response, status, statusText) {
				//alert(response + ":" + status + ":" + statusText);
				//} ,
				//dataFilter : function(response, status, statusText) {
				//alert(response + ":" + status + ":" + statusText);
				//} ,
				success : function(response, status, statusText) {
					//alert(response + ":" + status + ":" + statusText);
					if (response.status) {
					///	alert(response.content);
					} else {
						alert(response.content);
					}
				} ,
				error : function(response, status, statusText) {
					//alert(response + ":" + status + ":" + statusText);
				} ,
				complete : function(response, status, statusText) {
					//alert(response + ":" + status + ":" + statusText);
				}
		});
	}
</script>
<body>
	<form id="MyForm" method="post">
		<table>
			<tr>
				<td>
					<div>
						<span>登录名:</span> <input name="u" value="admin">
					</div>
				</td>
			</tr>
			<tr>
				<td>
					<div>
						<span>密码:</span> <input name="p" value="admin">
					</div>
				</td>
			</tr>
			<tr>
				<td>
					<div>
						<button type="button" onclick="doLogin()">登录</button>
					</div>
				</td>
			</tr>
		</table>
	</form>
	<iframe></iframe>
</body>
</html>
